1. Field of the Invention
The present invention relates to a flash disk card equipped with a flash memory for use as an external storage medium for an information processing device.
2. Description of the Related Art
A known flash disk card will be described below with reference to FIGS. 10 to 14. FIG. 10 is a drawing illustrating the configuration of the known flash disk card. FIG. 11 is a drawing illustrating the configuration of an address conversion table of the known flash disk card. FIG. 12 is a drawing illustrating an addressing system of the known flash disk card. FIG. 13 is a drawing illustrating the configuration of a flash memory of the known flash disk card. FIG. 14 is a drawing illustrating a change in content of the address conversion table of the known flash disk card.
In FIG. 10, a known flash disk card 1 comprises a flash disk control circuit 3 having a plurality of registers for receiving and transmitting cylinder, head and sector numbers or commands from the host device 2 such as a computer or the like, a MPU 4 for controlling the flash disk card, a logical/physical sector address conversion table 5 comprising a 1 Mbit SRAM, a flash memory array 6, for example, having 20 Mbytes, and a sector buffer 7 comprising a RAM.
As shown in FIG. 11, the logical/physical sector address conversion table 5 converts logical sector addresses (LSA) into physical sector addresses (PSA) of the flash memory array 6.
The flash memory array 6, which is an electrically rewritable nonvolatile memory, requires an erasing operation requiring more time than reading and writing operations during data rewriting. The flash memory array 6 erases data in blocks of several kilo-bytes to several tens kilobytes or chips. This unit is greater than the sector size (512 bytes) which is the unit of data transfer of a hard disk device.
Thus, the flash disk card 1, which emulates a hard disk device, i.e., performs a pseudo-operation, by using the flash memory array 6 generally employs the method of displaying only a flag indicating that the old sector is invalid without erasing the data of the old sector in response to a command to update data in units of sectors. The command is output from the host device 2, and writing updates data in a space area of the flash memory array 6.
In this method, since the correspondence between the sector-unit address (logical sector address: LSA) specified by the host device 2 and the address (physical sector address: PSA) of the flash memory 6 where update data is actually written changes each time data is updated, the logical/physical sector address conversion table 5 shown in FIG. 11 is used.
Like access to the hard disk device, the flash disk card 1 is accessed from the host device 2 by specifying a cylinder number, a head number and a sector number in four registers of the flash disk control circuit 3, as shown in FIG. 12. Two registers are used for higher and lower cylinder numbers. The cylinder number, head number and sector number are then converted into a logical sector address. This address conversion is performed on the basis of the following equation (1): EQU LSA=(C.times.HpC+H).times.SpH+S-1 (1)
wherein C is the cylinder number, HpC is the number of heads per cylinder, H is the head number, SpH is the number of sectors per head, and S is the sector number.
The MPU 4 converts the logical sector address (LSA) into the physical sector address (PSA) with reference to the logical/physical sector address conversion table 5. The physical sector address is used for operations of reading and writing data.
Description will now be made of update of a content, for example, the content of logical sector address L2, of the flash memory 6. As shown in FIG. 13, the flash memory 6 has a data area having physical sector addresses of P0, P1, P2 to PX, and a space area having physical sector addresses from PY. In the flash memory 6, the logical sector addresses L0 to L2 are presently used (data is actually stored).
The MPU 4 first reads the content of the present logical sector address L2 (physical sector address P2), confirms that the read data is effective, and then sets an invalid sector flag (mark .DELTA.). The MPU 4 then checks the content of physical sector address PY of the space area, confirms that the sector is a spare sector, and then writes update data therein.
The content of the physical sector address corresponding to logical sector address L2 of the logical/physical sector address conversion table 5 is converted from 2 to Y, as shown in FIG. 14.
In this way, since the correspondence between the sector-unit address (LSA) specified by the host device 2 and the physical sector address (PSA) of the flash memory 6 where update data is actually written changes each time data is updated, the logical/physical sector address conversion table 5 is used. In a simple writing operation, the MPU 4 adds the logical/physical sector address conversion table 5 for causing the logical sector address to correspond to the physical sector address.
Although SRAM is used for the logical/physical sector address conversion table 5 because of the rewriting frequency and high speed, the conversion table 5 is formed in units of sectors (512 bytes), thereby causing the problem that the size of the SRAM for the conversion table increases as the card capacity increases.
In an example where the flash disk card 1 has 20 Mbytes, the number of sectors is 40 k, and 16 digits (2 bytes) are required for binary representation display of the 40 k sectors. The size of the SRAM for the conversion table is thus 80 kbytes, and SRAM with 1 Mbits (128 bytes) is finally required.
The above known flash disk card 1 comprises the logical/physical sector address conversion table 5 which is formed in units of sectors, and thus has the problem that the size of the conversion table increases as the capacity of the card increases.
Although the SRAM is used for storing the large conversion table, the SRAM is volatile and thus has the problem that the table must be reconstructed each time a power supply is turned on.